import request from '@/utils/request'

// 列表
export function getactivity(data){
    return request({
        url: 'activity',
        method: 'get',
        params:data
      })
}

//详情
export function getactivityread(data){
    return request({
        url: 'activity/read',
        method: 'get',
        params:data,
        headers:{
          'showLoading':true
        }
      })
}
//申请
export function activityapply(data){
    return request({
        url: 'activity/apply',
        method: 'post',
        data:data
      })
}
//报名抽奖记录
export function unionlottohistory(data){
    return request({
        url: 'activity/unionlottohistory',
        method: 'get',
       params:data,
        headers:{
          'showLoading':true
        }
      })
}
//免费试学记录
export function prepareHistory(data){
    return request({
        url: 'activity/prepareHistory',
        method: 'get',
       params:data,
        headers:{
          'showLoading':true
        }
      })
}
//免费服务记录
export function stewardHistory(data){
    return request({
        url: 'student',
        method: 'get',
       params:data,
        headers:{
          'showLoading':true
        }
      })
}






//套餐
export function packageRecord(data){
    return request({
        url: 'prepare/package/record',
        method: 'get',
       params:data,
        headers:{
          'showLoading':true
        }
      })
}
export function packageSetting(data){
    return request({
        url: 'prepare/package/setting',
        method: 'post',
       data,
        headers:{
          'showLoading':false
        }
      })
}
export function preparePackage(data){
    return request({
        url: 'prepare/package',
        method: 'get',
        params:data,
        headers:{
          'showLoading':false,
          'loadingTarget':'.innerloding'
        }
      })
}
export function orderCreate(data){
    return request({
        url: 'order/create',
        method: 'post',
        data,
        headers:{
          'showLoading':false,
         
        }
      })
}
export function wechatpayNative(data){
    return request({
        url: 'wechatpay/native',
        method: 'post',
        data,
        headers:{
          'showLoading':true,
          'loadingTarget':'.innerloding'
        }
      })
}
export function alipayNative(data){
    return request({
        url: 'alipay/native',
        method: 'post',
        data,
        headers:{
          'showLoading':true,
          'loadingTarget':'.innerloding'
        }
      })
}
export function orderCheckorder(data){
    return request({
        url: 'order/checkorder',
        method: 'get',
        params:data,
        headers:{
          'showLoading':false,
        }
      })
}
export function prepareCancel(data){
    return request({
        url: 'prepare/package/cancel',
        method: 'put',
        data,
        headers:{
          'showLoading':false,
        }
      })
}
export function orderDeal(data){
    return request({
        url: 'order/deal',
        method: 'get',
        params:data,
        headers:{
          'showLoading':false,
        }
      })
}
